package com.example.dou2204.utils;

import com.example.dou2204.entity.BannerEntity;
import com.example.dou2204.entity.CommentEntity;
import com.example.dou2204.entity.GiftEntity;
import com.example.dou2204.entity.ResultEntity;
import com.example.dou2204.entity.UserEntity;
import com.example.dou2204.entity.VideoEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiServer {
    @GET(ConstantsUtils.BANNER_URL)
    Observable<BannerEntity> banner();
    @POST(ConstantsUtils.REGISTER_URL)
    Observable<UserEntity> register(@Body RequestBody body);
    @POST(ConstantsUtils.LOGIN_URL)
    Observable<UserEntity> login(@Body RequestBody body);
    @GET(ConstantsUtils.VIDEO_URL)
    Observable<VideoEntity> video(@Query("currentPage")int page,@Query("pageSize") int size);
    @POST(ConstantsUtils.GUANZUH_URL)
    Observable<ResultEntity> guanzhu(@Body RequestBody body);
    @POST(ConstantsUtils.NOGUANZHU_URL)
    Observable<ResultEntity> noguanzhu(@Body RequestBody body);
    @POST(ConstantsUtils.LOVE_URL)
    Observable<ResultEntity> love(@Query("videoId")int videoId);
    @POST(ConstantsUtils.NOLOVE_URL)
    Observable<ResultEntity> nolove(@Query("videoId")int videoId);
    @GET(ConstantsUtils.GETCOMMENT_URL)
    Observable<CommentEntity> getcomment(@Query("videoId") int id);
    @POST(ConstantsUtils.COMMENT_URL)
    Observable<CommentEntity> comment(@Body RequestBody body);
@GET(ConstantsUtils.GIFT_URL)
    Observable<GiftEntity> gift();
}
